<pre>
<?php 
require_once 'class/config.php';
$db = DataBase::getInstance();
$countryIdentifiers = $db->getCountriesIdentifiers();
$treatyDetails = $db->getTreatyDetails();

//var_dump($countryDetails);
?>

</pre>
<script type="text/javascript">
	
/* Country click handler */
function countryclick(tld) {
	alert('Country clicked: '+tld);
}

jQuery(document).ready(function(){
	jQuery('#place').SVGWorldMap({
		bottom:20, /* Bottom padding (removes antarctica from map) */
		clickhandler :'countryclick', /* Click handler function name */
//		c : {RO:2,BR:1,RU:<?php echo 3	?>,IN:1,CN:1,US:2,UK:2} /* Country classes */

		c : {
			<?php 
			foreach ($countryIdentifiers as $countryIdentifier){
				echo $countryIdentifier['countryIdentifier'] . ':1,';
			}
			foreach ($treatyDetails as $treatyDetail){
				if ($treatyDetail['signature'] != '0000-00-00'){
					echo $treatyDetail['countryIdentifier'] . ':3,';
				}else if ($treatyDetail['ratification'] != '0000-00-00'){
					echo $treatyDetail['countryIdentifier'] . ':4,';
				}
			}
			?> 
			}
			});
	
});
	
</script>					